<UserControl x:Class="OutSync.UserControls.LogoHeaderUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <UserControl.Resources>
    <Style x:Key="TitleStyle" TargetType="{x:Type Label}">
      <Setter Property="FontSize" Value="22" />
      <Setter Property="FontFamily" Value="Tahoma" />
      <Setter Property="VerticalAlignment" Value="Center" />
      <Setter Property="BitmapEffect">
        <Setter.Value>
          <OuterGlowBitmapEffect GlowColor="White" GlowSize="10" Opacity="1"/>
        </Setter.Value>
      </Setter>
    </Style>

    <Style x:Key="SubtitleStyle" TargetType="{x:Type Label}">
      <Setter Property="FontFamily" Value="Tahoma" />
      <Setter Property="VerticalAlignment" Value="Center" />
      <Setter Property="BitmapEffect">
        <Setter.Value>
          <OuterGlowBitmapEffect GlowColor="LightGray" GlowSize="10" Opacity="1"/>
        </Setter.Value>
      </Setter>
      
      <Style.Triggers>
        <Trigger Property="IsMouseOver" Value="True">
          <Setter Property="BitmapEffect">
            <Setter.Value>
              <OuterGlowBitmapEffect GlowColor="White" GlowSize="10" Opacity="1"/>
            </Setter.Value>
          </Setter>
        </Trigger>
      </Style.Triggers>
    </Style>

    <ControlTemplate x:Key="toolbarButtonTemplate" TargetType="{x:Type Button}">
      <Grid>
        <Ellipse x:Name="outerCircle" Width="25" Height="25">
          <Ellipse.Fill>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
              <GradientStop Offset="0" Color="Silver" />
              <GradientStop Offset="1" Color="Gray" />
            </LinearGradientBrush>
          </Ellipse.Fill>
        </Ellipse>

        <Ellipse Width="20" Height="20">
          <Ellipse.Fill>
            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
              <GradientStop Offset="0" Color="White" />
              <GradientStop Offset="1" Color="Transparent" />
            </LinearGradientBrush>
          </Ellipse.Fill>
        </Ellipse>

        <Viewbox>
          <ContentPresenter Margin="10" />
        </Viewbox>
      </Grid>

      <ControlTemplate.Triggers>
        <Trigger Property="Button.IsMouseOver" Value="True">
          <Setter TargetName="outerCircle" Property="Fill" Value="Gray"></Setter>
        </Trigger>
        <Trigger Property="Button.IsPressed" Value="True">
          <Setter Property="RenderTransform">
            <Setter.Value>
              <ScaleTransform ScaleX=".95" ScaleY=".95" />
            </Setter.Value>
          </Setter>
          <Setter Property="RenderTransformOrigin" Value=".5,.5"></Setter>
        </Trigger>
      </ControlTemplate.Triggers>
    </ControlTemplate>
  </UserControl.Resources>

  <DockPanel>
    <Button ToolTip="About" Width="32" Height="32" Margin="0,5,0,5" DockPanel.Dock="Right" Template="{StaticResource toolbarButtonTemplate}" Click="about_Click" >
      <Image Source="\Resources\About.ico" Width="30" />
    </Button>

    <StackPanel Orientation="Horizontal" >
      <Label Margin="0,-5,0,0" Style="{StaticResource TitleStyle}" FontWeight="DemiBold">Out</Label>
      <Label Margin="-7,-5,0,0" Style="{StaticResource TitleStyle}" FontWeight="Thin">Sync</Label>
      <Label Margin="10,-3,0,0" Style="{StaticResource SubtitleStyle}">Synchronize your Outlook® contacts with Facebook™</Label>
    </StackPanel>
  </DockPanel>
</UserControl>